package com.hc.model.code04.test4;

/**
 * @version v1.0
 * @ClassName: Client
 * @Description: 测试类
 * @Author: HC
 */
public class Client {

    public static void main(String[] args) {
        // 发起请假
        LeaveRequest leave = new LeaveRequest("小明", 1, "生病");

        // 创建各位领导对象
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        // 设置上级关系
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        // 等待审批
        groupLeader.submit(leave);

    }
}
